if in2=cleargad then oldpos=topipe('id 'txtgad' gt ""')
if in2=savegad then do
call writeln(ca,'id 'filegad' s 1 save 1 fn "'filename'"')
parse value readln(ca) with res1 '"' res2 '"'
if (res1>0) then do
filename=res2
call writeln(ca,'id 'txtgad' read')
len=readln(ca)
data=readch(ca,len)
if( open(out,res2,'W')) then do
call writech(out,data)
call close(out)
end
end
end
return
windowclosed:
/*call setenv()*/
exit
return
setdefaults:
parse source . . called .
oldpos=0
filename=''
scrpos=''
envname='onlinedictionary'
call getenv()
abouttx='Online Dictionary*nVers 1.1*nAuthor William Parker*nGUI by AWNPipe:'
return
buildgui:
help.1=' Enter word to look up '
help.2=' This area displays the retreived definitions. It is read only *n but you may drag and copy the results to the clipboard. *n The cursor keys can be used to scroll the information.'
help.4=' Save retreived definitions to a file '
help.5=' Remove all retreived definitions '
help.6=' Quit the dictionary '
call open(ca,"awnpipe:dict/xc")
call topipe(' ps awebb "Online Dictionary" sk v defg ig h state m a 'window' ii "'called'"' )